<?php
abstract class searchBase
{
    protected $db;
    protected $dsn = 'mysql:dbname=data_search;host=localhost';
    protected $user = 'root';
    protected $password = '';
    public function __construct()
    {
        try {
            $this->db = new PDO($this->dsn,$this->user,$this->password);//,array(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => "true",PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")
			$this->db->exec("SET NAMES utf8");
        } catch (PDOException $e) {
            echo 'Connection failed: ' . $e->getMessage();
        }
    }
}
?>
